package com.diandian.backend.entrance.client;

import com.diandian.backend.entrance.client.dto.OrderOnlineMeituanShangouSourceAddParamDTO;
import com.diandian.backend.entrance.client.dto.douyinlife.OrderOnlineDouyinLifeAddOneParamDTO;
import com.diandian.backend.entrance.client.dto.douyinlife.OrderOnlineDouyinLifeAddParam;
import com.diandian.backend.entrance.client.dto.douyinlife.OrderOnlineDouyinLifeUpdateParamParamDTO;
import com.diandian.base.boot.starter.response.BaseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("diandian-order")
//@FeignClient(value = "business-order-center", url = "http://localhost:10010", path = "")
public interface DianDianOrderClient {

    @PostMapping("/order/online/meituan/shangou/source/add")
    BaseResult add(@RequestBody OrderOnlineMeituanShangouSourceAddParamDTO param);

    /**
     * 同步抖音线上订单
     * 注：目前仅用于线上批量同步抖音订单数据
     * @return
     * @throws Exception
     */
    @PostMapping("/order/online/douyin/life/sych/one")
    BaseResult syncDouYinLifeOne(@RequestBody OrderOnlineDouyinLifeAddOneParamDTO param);

    @PostMapping("/order/online/douyin/life/status")
    BaseResult updateDouYinLifeOneStatus(@RequestBody OrderOnlineDouyinLifeUpdateParamParamDTO param);

    /**
     * 大批量接收抖音线上订单消息
     * 注：目前仅用于线上批量同步抖音订单数据
     * @return
     * @throws Exception
     */
    @PostMapping("/order/online/douyin/life/sych")
    BaseResult syncDouYinLifeBatch(@RequestBody OrderOnlineDouyinLifeAddParam param);
}
